﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CMS.BLL;

public partial class Controls_Setting_ctrSupport : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.InitData();
        }
    }
    private void InitData()
    {
        Company objCompany = new Company();
        objCompany.LoadById(Config.COMPANY_DEFAULT);
        if (objCompany.Data.YahooAccount1 != "")
        {
            ltrSupportYahoo1.Text = "<a href=\"ymsgr:sendIM?" 
                + objCompany.Data.YahooAccount1 + "\"><img src=\"http://opi.yahoo.com/online?u=<B>" 
                + objCompany.Data.YahooAccount1 + "</B>&m=g&t=1\" border=\"0\" />&nbsp;"
                + objCompany.Data.YahooDisplayName1 + "</a>";
        }
        if (objCompany.Data.YahooAccount2 != "")
        {
            ltrSupportYahoo2.Text = "<a href=\"ymsgr:sendIM?"
                + objCompany.Data.YahooAccount2 + "\"><img src=\"http://opi.yahoo.com/online?u=<B>"
                + objCompany.Data.YahooAccount2 + "</B>&m=g&t=1\" border=\"0\" />&nbsp;"
                + objCompany.Data.YahooDisplayName2 + "</a>";
        }
        if (objCompany.Data.YahooAccount3 != "")
        {
            ltrSupportYahoo3.Text = "<a href=\"ymsgr:sendIM?"
                + objCompany.Data.YahooAccount3 + "\"><img src=\"http://opi.yahoo.com/online?u=<B>"
                + objCompany.Data.YahooAccount3 + "</B>&m=g&t=1\" border=\"0\" />&nbsp;"
                + objCompany.Data.YahooDisplayName3 + "</a>";
        }
        if (objCompany.Data.YahooAccount4 != "")
        {
            ltrSupportYahoo4.Text = "<a href=\"ymsgr:sendIM?"
                + objCompany.Data.YahooAccount4 + "\"><img src=\"http://opi.yahoo.com/online?u=<B>"
                + objCompany.Data.YahooAccount4 + "</B>&m=g&t=1\" border=\"0\" />&nbsp;"
                + objCompany.Data.YahooDisplayName4 + "</a>";
        }

        if (objCompany.Data.SkypeAccount1 != "")
        {
            ltrSupportSkype1.Text = "<script type=\"text/javascript\" src=\"http://download.skype.com/share/skypebuttons/js/skypeCheck.js\"></script><a href=\"skype:"
            + objCompany.Data.SkypeAccount1 + "?call\"><img src=\"http://mystatus.skype.com/balloon/" 
            + objCompany.Data.SkypeAccount1 + "\" style=\"border: none;\" width=\"65\" height=\"23\" alt=\"My status\" />&nbsp;" 
            + objCompany.Data.SkypeDisplayName1 + "</a>";
        }
        if (objCompany.Data.SkypeAccount2 != "")
        {
            ltrSupportSkype2.Text = "<script type=\"text/javascript\" src=\"http://download.skype.com/share/skypebuttons/js/skypeCheck.js\"></script><a href=\"skype:"
            + objCompany.Data.SkypeAccount2 + "?call\"><img src=\"http://mystatus.skype.com/balloon/" 
            + objCompany.Data.SkypeAccount2 + "\" style=\"border: none;\" width=\"65\" height=\"23\" alt=\"My status\" />&nbsp;" 
            + objCompany.Data.SkypeDisplayName2 + "</a>";
        }
        if (objCompany.Data.SkypeAccount3 != "")
        {
            ltrSupportSkype3.Text = "<script type=\"text/javascript\" src=\"http://download.skype.com/share/skypebuttons/js/skypeCheck.js\"></script><a href=\"skype:"
            + objCompany.Data.SkypeAccount3 + "?call\"><img src=\"http://mystatus.skype.com/balloon/" 
            + objCompany.Data.SkypeAccount3 + "\" style=\"border: none;\" width=\"65\" height=\"23\" alt=\"My status\" />&nbsp;" 
            + objCompany.Data.SkypeDisplayName3 + "</a>";
        }
        if (objCompany.Data.SkypeAccount4 != "")
        {
            ltrSupportSkype4.Text = "<script type=\"text/javascript\" src=\"http://download.skype.com/share/skypebuttons/js/skypeCheck.js\"></script><a href=\"skype:"
            + objCompany.Data.SkypeAccount4 + "?call\"><img src=\"http://mystatus.skype.com/balloon/" 
            + objCompany.Data.SkypeAccount4 + "\" style=\"border: none;\" width=\"65\" height=\"23\" alt=\"My status\" />&nbsp;" 
            + objCompany.Data.SkypeDisplayName3 + "</a>";
        }
    }
}